﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using System.Data;

namespace ShopOnline
{
    public class SqlDataProvider
    {
        private Database _dt;

        public SqlDataProvider(string ConnectionStringName){
            _dt = EnterpriseLibraryContainer.Current.GetInstance<Database>(ConnectionStringName);
        }

        public DataSet ExecuteQueryStoreProc(string strStoreProc, params object[] arrParams)
        {
            return (DataSet)_dt.ExecuteDataSet(strStoreProc, arrParams);
        }
    }
}
